﻿using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AnesSystem.Controls
{
    /// <summary>
    /// VerticalBlackLine.xaml 的交互逻辑
    /// </summary>
    public partial class VerticalBlackLine : BaseDrugLineItemCtrl
    {
        public VerticalBlackLine()
        {

            InitializeComponent();
            
            //_lineLeft.Stroke = MyStroke;
            //_lineRight.Stroke = MyStroke;
            
            ThicknessLeft = 2;
            ThicknessRight = 2;
            Yup = Y1 - 5;
            Ydn = Y1 + 3;
            this.Loaded += VerticalBlackLine_Loaded;

        }
        #region Variables

        #endregion

        #region Constructor


        private void VerticalBlackLine_Loaded(object sender, RoutedEventArgs e)
        {
            _speed.Margin = new Thickness(X1, 0, 0, 0);
        }

        #endregion

        #region Properties
        
        public double ThicknessLeft
        {
            get
            {
                return _lineLeft.StrokeThickness;
            }
            set
            {
                _lineLeft.StrokeThickness = value;

            }
        }
        public double ThicknessRight
        {
            get
            {
                return _lineRight.StrokeThickness;
            }
            set
            {
                _lineRight.StrokeThickness = value;

            }
        }
        #endregion

        #region 依赖属性
           
        public double Yup
        {
            get { return (double)GetValue(YupProperty); }
            set { SetValue(YupProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Y2.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty YupProperty =
            DependencyProperty.Register("Yup", typeof(double), typeof(VerticalBlackLine), new PropertyMetadata(1.0));


        public double Ydn
        {
            get { return (double)GetValue(YdnProperty); }
            set { SetValue(YdnProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Y2.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty YdnProperty =
            DependencyProperty.Register("Ydn", typeof(double), typeof(VerticalBlackLine), new PropertyMetadata(1.0));



        #endregion

        #region Event

        #endregion

        #region Private Methods

        #endregion

        #region Public/Protected Methods

        #endregion

        #region EventHandlers

        #endregion
    }

}
